<%@page import="javax.swing.JOptionPane"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="model.pojo.*"%>
<%@page import="model.dao.*"%>
<%@page import="java.util.ArrayList"%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <table class="tbborder" >
                <tr align="center" valign="middle">
                    <td height="40" colspan="2" class="menu1">
                        DANH MỤC SẢN PHẨM
                    </td>
                </tr>
                <tr>

                    <td colspan=" 2">
                        <ul id="MenuBar1" class="MenuBarVertical">
                            <%
                                ArrayList<DanhMuc> dms = (new DanhMucDAO()).getList();
                                for (int i = 0; i < dms.size(); i++) {
                                    DanhMuc dm = dms.get(i);
                            %>
                            <!--B?t d?u danh m?c-->
                            <li><a class="MenuBarItemSubmenu" href="SanPhamDanhMuc.do?MaDanhMuc=<%=dm.getMaDanhMuc()%>&TenDanhMuc=<%=dm.getTenDanhMuc()%>"><%=dm.getTenDanhMuc()%></a>
                                <ul>
                                    <!--B?t d?u chi ti?t danh m?c-->
                                    <%
                                        ArrayList<ChiTietDanhMuc> ctdms = (new ChiTietDanhMucDAO()).getChiTietDanhMuc(dm.getMaDanhMuc());
                                        for (int j = 0; j < ctdms.size(); j++) {
                                            ChiTietDanhMuc ctdm = ctdms.get(j);
                                    %>
                                    <li><a href="SanPhamChiTietDanhMuc.do?MaDanhMuc=<%=ctdm.getMaChiTietDanhMuc()%>&TenDanhMuc=<%=ctdm.getTenChiTietDanhMuc()%>&MaParent=<%=dm.getMaDanhMuc()%>&TenParent=<%=dm.getTenDanhMuc()%>" class="MenuBarItemSubmenu"><%=ctdm.getTenChiTietDanhMuc()%></a> </li>
                                    <!--K?t thúc chi ti?t danh m?c-->
                                    <%}%>
                                </ul>
                            </li>
                            <!--K?t thúc danh m?c-->   
                            <%}%>
                        </ul>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table class="tbborder">
                <tr align="center" valign="middle">
                    <td class="menu1" height="40" colspan="2">
                        HỖ TRỢ TRỰC TUYẾN
                    </td>
                </tr>
                <tr>

                    <td width="50%" height="25" align="center" valign="middle">
                        Tư vấn
                    </td>
                    <td width="50%">
                        <a href="#">
                            <img src="images/offline.gif" width="100%" height="20" /></a>
                    </td>
                </tr>
                <tr>
                    <td width="50%" height="25" align="center" valign="middle">
                        Mua bán
                    </td>
                    <td width="50%">
                        <a href="#">
                            <img src="images/offline.gif" width="100%" height="20" />
                        </a>
                    </td>
                </tr>
                <tr>
                    <td width="50%" height="25" align="center" valign="middle">
                        Kỹ thuật
                    </td>
                    <td width="50%">
                        <a href="#">
                            <img src="images/offline.gif" width="100%" height="20" />
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table class="tbborder">
                <tr align="center" valign="middle">
                    <td class="menu1" height="40" colspan="2">
                        SỐ LƯỢT TRUY CẬP
                    </td>
                </tr>
                <tr>

                    <td height="25" colspan="2" style="padding-left: 10px">
                        Đang online :54
                    </td>
                </tr>
                <tr>
                    <td height="25" colspan="2" style="padding-left: 10px">
                        Hôm nay: 542
                    </td>
                </tr>
                <tr>
                    <td height="25" colspan="2" style="padding-left: 10px">
                        Hôm qua: 500
                    </td>
                </tr>
                <tr>
                    <td height="25" colspan="2" style="padding-left: 10px">
                        Tất cả: 54321
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", { imgRight: "../SpryAssets/SpryMenuBarRightHover.gif" });
</script>